package com.fm.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * 产品
 * Created by Administrator on 2018/7/30 0030.
 */
@Entity(name = "ul_rule")
@NoArgsConstructor
@AllArgsConstructor
@Data
public class Rule extends AbstractMyBatisEntity{
    /**
     *
     */
    @Id
    @GeneratedValue
    private Integer id;
    private String name;

    private String introduction;

    private Integer productId;

    private Integer equipmentId;

    private String topicId;

    private String fields;
    //用户id
    private Integer userId;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date createTime;

    private Integer status;//0未使用1使用中

    private String code;//执行代码

    private Integer isCustom;//是否自定义输出0否1是

    @Transient
    private List<RuleSql> ruleSqlList;
}
